<?php
    if ($type != null) {
        if ($type == 'passport') {
            echo $this->Certificates->passport($record);
        } elseif ($type == 'certificate') {
            echo $this->Certificates->certificate($record);
        } elseif ($type == 'diploma') {
            echo $this->Certificates->diploma($record);
        }
    } else { ?>
        <div class="alert alert-warning"> <?php echo __("¡No se encontro documento valido!"); ?></div>
    <?php } ?>